package bootstrap

import (
	"github.com/gin-gonic/gin"
	"tools-api/src/routes/middlewares"
	v1 "tools-api/src/routes/v1"
)

func SetupRoute(router *gin.Engine) {
	registerMiddleware(router)
	v1.AuthWithout(router) // 不需要校验权限
	v1.AuthJCJ(router)     // 聚财记
	v1.NoRouterDefine(router)
}
func registerMiddleware(router *gin.Engine) {
	router.Use(middlewares.Cors())
	router.Use(middlewares.Ignore())
	router.Use(middlewares.RateLimit())
}
